package io.renren.modules.customer.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.renren.common.enums.*;
import io.renren.common.jackson.TimestampDeserializer;
import io.renren.common.jackson.TimestampSerializer;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * 
 * @author Sean
 * @email seanla@qq.com
 * @date 2020-03-17 16:36:45
 */
@Data
@TableName("t_batch_application")
@Accessors(chain = true)
@ToString
public class BatchApplicationEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long id;

	/**
	 * 批次号
	 */
	@NotBlank(message = "批次号不能为空")
	private String batchNumber;

	/**
	 * 进件状态
	 */
	@NotBlank(message = "状态不能为空")
	private CommonProcessStatus status;

	/**
	 * 提交次数，默认为0
	 */
	private Integer requestCount;

	/**
	 * 提交时间
	 */
	@JsonSerialize(using = TimestampSerializer.class)
	@JsonDeserialize(using = TimestampDeserializer.class)
	private Date requestTime;

	/**
	 * 姓名
	 */
	@NotBlank(message = "姓名不能为空")
	private String name;

	/**
	 * 用户手机号码
	 */
	@NotBlank(message = "手机号码不能为空")
	private String mobilePhone;

	/**
	 * 城市
	 */
	private String city;

	/**
	 * 获客渠道
	 */
	private String channel;

	/**
	 * 名单来源
	 */
	private String channelSource;
	/**
	 * 获客标签
	 */
	private String label;
	/**
	 * 性别
	 */
	private GenderType gender;

	/**
	 * 身份证号码
	 */
	private String idNumber;

	/**
	 * 出生年月日
	 */
	@JsonSerialize(using = TimestampSerializer.class)
	@JsonDeserialize(using = TimestampDeserializer.class)
	private Date birthDay;
	/**
	 * 年龄
	 */
	private Integer age;
	/**
	 * 是否购房
	 */
	@JsonProperty("isHouse")
	@JsonFormat(shape = JsonFormat.Shape.NUMBER)
	private Boolean isHouse;

	/**
	 * 购房时间
	 */
	private PaHousingPeriodType housingBuyPeriod;

	/**
	 * 月收入
	 */
	private PaMonthIncomeType monthIncome;

	/**
	 * 是否购车
	 */
	@JsonProperty("carStatus")
	@JsonFormat(shape = JsonFormat.Shape.NUMBER)
	private Boolean carStatus;

	/**
	 * 车辆是否抵押
	 */
	@JsonProperty("carPledgeStatus")
	@JsonFormat(shape = JsonFormat.Shape.NUMBER)
	private Boolean carPledgeStatus;

	/**
	 * 平安寿险情况
	 */
	@JsonProperty("paInsuranceType")
	@JsonFormat(shape = JsonFormat.Shape.NUMBER)
	private PaInsurancePeriodType paInsuranceType;

	/**
	 * 公积金最近连续缴纳月数
	 */
	private DepositPeriodType depositPeriod;

	/**
	 * 响应内容
	 */
	private String response;

	/**
	 * 创建者ID
	 */
	private Long createUserId;

	/**
	 * 创建时间
	 */
	@JsonSerialize(using = TimestampSerializer.class)
	@JsonDeserialize(using = TimestampDeserializer.class)
	private Date createTime;

}
